package top.huahaizhi.mpchart.demo;

import android.os.Handler;
import android.os.Looper;
import android.util.Log;

/*
 * 子线程 handler （发动过来的请求都在这个子线程中执行）
 */
public class DrawThread extends Thread {
    private Handler handler;

    DrawThread() {
        start();
    }

    public Handler getHandler() {
        return handler;
    }

    public void setHandler(Handler handler) {
        this.handler = handler;
    }

    @Override
    public void run() {
        Looper.prepare();
        handler = new Handler();
        Looper.loop();
    }
}